package com.weasel.im.common.manager;

import com.weasel.im.common.service.UserSessionRelation;
import com.weasel.im.common.service.impl.DefaultUserSessionRelationImpl;

/**
 * Created by Dylan on 2015/12/3.
 */
public class UserSessionRelationManager {

    private UserSessionRelation relation = new DefaultUserSessionRelationImpl();

    public void relation(String username, String sessionid) {

        relation.relation(username,sessionid);
    }

    public String getUsernameBySessionid(String sessionid) {
        return relation.getUsernameBySessionid(sessionid);
    }

    public String getSessionidByUsername(String username) {
        return relation.getSessionidByUsername(username);
    }

    public UserSessionRelation getRelation() {
        return relation;
    }

    public void setRelation(UserSessionRelation relation) {
        this.relation = relation;
    }
}
